import { IPSDELogicLinkCond } from './ipsdelogic-link-cond';
import { IPSDELogicLinkGroupCond } from './ipsdelogic-link-group-cond';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDELogicLinkGroupCondImpl extends PSModelObjectImpl implements IPSDELogicLinkGroupCond {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get groupOP(): 'AND' | 'OR' {
    return this.M.groupOP;
  }

  get logicType(): 'GROUP' | 'SINGLE' {
    return this.M.logicType;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected psdelogiclinkconds: IPSDELogicLinkCond[] | null = null;

  getPSDELogicLinkConds(): IPSDELogicLinkCond[] | null {
    if (this.psdelogiclinkconds == null) {
      this.psdelogiclinkconds = this.fillChildListModel(this.M.getPSDELogicLinkConds, 'dataentity.logic.IPSDELogicLinkCond') as IPSDELogicLinkCond[];
    }
    return this.psdelogiclinkconds;
  }

  get psDELogicLinkConds(): IPSDELogicLinkCond[] | null {
    return this.getPSDELogicLinkConds();
  }

  findPSDELogicLinkCond(objKey: any): IPSDELogicLinkCond | null {
    return this.getPSModel5('dataentity.logic.IPSDELogicLinkCond', this.getPSDELogicLinkConds(), objKey) as IPSDELogicLinkCond;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get notMode(): boolean {
    return this.M.notMode != null ? this.M.notMode : false;
  }

  get cls(): string {
    return 'PSDELogicLinkGroupCondImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'dataentity.logic.IPSDELogicLinkGroupCond') return true;
    return super.instanceof(cls);
  }
}
